const { stratzService, imageService } = require('../utils/request')

function getPlayerHistory(userId) {
  return stratzService({
    url: `/Player/${userId}`,
    method: 'get',
    headers:{
      authorization:'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiJodHRwczovL3N0ZWFtY29tbXVuaXR5LmNvbS9vcGVuaWQvaWQvNzY1NjExOTgxNDkxMjU0NjMiLCJ1bmlxdWVfbmFtZSI6Ik9L6IKl5LuUIiwiU3ViamVjdCI6IjAyOTVmMzEwLWMyY2ItNGM3NC1hN2I0LTZjZDliNTk1ZDIzZCIsIlN0ZWFtSWQiOiIxODg4NTk3MzUiLCJuYmYiOjE2Mzk2MjA0OTYsImV4cCI6MTY3MTE1NjQ5NiwiaWF0IjoxNjM5NjIwNDk2LCJpc3MiOiJodHRwczovL2FwaS5zdHJhdHouY29tIn0.eD9LWerYIMV9NPYgCcr_1ewQ9wk48ofbcnZ2airmwSM'
    }
  })
}

function getImage(data) {
  return imageService({
    url: `/api/request`,
    method: 'post',
    data
  })
}

module.exports = {
  getPlayerHistory,
  getImage
}